import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-10-19
 * Time: 17:42
 */
public class Exam1018 {
//    public int findMinimum(int n, int[] left, int[] right) {
//        // write code here
//
//    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        while(n != 0) {
            int y = n % 2;
            if(y == 1) {
                count++;
            }
            n /= 2;
        }
        System.out.println(count);
    }
}
